home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Internet / News / Alexandra.0.82 / Source / NiceStuff.subproj / EDTextAppend.m < prev    next >
Encoding:
Text File  |  1996-01-30  |  1.5 KB  |  73 lines

  1.  
  2. #import "EDTextAppend.h"
  3. #import <appkit/Font.h>
  4.  
  5. @implementation Text(EDTextAppend2)
  6.  
  7. - appendString:(const char *)string withFont:(Font *)font
  8.     {
  9.     [self setSel:[self textLength]:[self textLength]];
  10.     [self setSelFont:font];
  11.     [self replaceSel:string];    
  12.     return self;
  13.     }
  14.  
  15. - appendString:(const char *)string length:(int)length withFont:(Font *)font;
  16.     {
  17.     [self setSel:[self textLength]:[self textLength]];
  18.     [self setSelFont:font];
  19.     [self replaceSel:string length:length];    
  20.     return self;
  21.     }
  22.  
  23. - appendString:(const char *)string withSize:(float)size 
  24.     andStyle:(NXFontTraitMask)style;
  25.     {
  26.     [self setSel:[self textLength]:[self textLength]];
  27.     [self setSelFontSize:size];
  28.     [self setSelFontStyle:style];
  29.     [self replaceSel:string];    
  30.     return self;
  31.     }
  32.  
  33. - insertString:(const char *)string withFont:(Font *)font
  34.     {
  35.     [self setSel:0:0];
  36.     [self setSelFont:font];
  37.     [self replaceSel:string];    
  38.     return self;
  39.     }
  40.  
  41. - insertString:(const char *)string length:(int)length withFont:(Font *)font;
  42.     {
  43.     [self setSel:0:0];
  44.     [self setSelFont:font];
  45.     [self replaceSel:string length:length];    
  46.     return self;
  47.     }
  48.  
  49.  
  50. - insertString:(const char *)string withSize:(float)size 
  51.     andStyle:(NXFontTraitMask)style;
  52.     {
  53.     [self setSel:0:0];
  54.     [self setSelFontSize:size];
  55.     [self setSelFontStyle:style];
  56.     [self replaceSel:string];    
  57.     return self;
  58.     }
  59.     
  60. /*
  61. - printfStringValue:(const char *)fmt,...;
  62.     {
  63.     va_list args;
  64.     static char buf[1024];
  65.     va_start(args,fmt);
  66.     vsprintf(buf,fmt,args);
  67.     [self setStringValue:buf];
  68.     NXPing();
  69.     return self;
  70.     }
  71. */
  72. @end
  73.